const path = require("path");
const babel = require("rollup-plugin-babel");
const commonjs = require("@rollup/plugin-commonjs");
// const terser = require("@rollup/plugin-terser");
const resolve = (...args) => {
  return path.resolve(__dirname, ...args);
};
// module.exports = {
export default {
  input: resolve("./index.js"),
  output: [
    // {
    //   format: "esm",
    //   // name: "monitorSDK-esm",
    //   file: resolve("./lib/bundle.esm.js"),
    // },
    // {
    //   format: "cjs",
    //   // name: "monitorSDK-cjs",
    //   file: resolve("./lib/bundle.cjs.js"),
    // },
    {
      format: "umd",
      name: "monitorSDK-umd",
      file: resolve("./lib/bundle.umd.js"),
      exports: "auto",
      sourcemap: true,
    },
    // {
    //   format: "iife",
    //   name: "monitorSDK-iife",
    //   file: resolve("./lib/bundle.browser.js"),
    // },
  ],
  plugins: [
    babel({
      exclude: "node_modules/**",
    }),
    // commonjs(),
    // terser(),
  ],
};
